import { DataSource } from 'typeorm';
import { Novel } from './src/modules/novel/entities/novel.entity.js';
import { NovelChapter } from './src/modules/novel/entities/novel-chapter.entity.js';
import { MasterCategory } from './src/modules/novel/entities/master-category.entity.js';

export const AppDataSource = new DataSource({
  type: 'mysql',
  host: '124.222.38.18',
  port: 3306,
  username: 'root',
  password: 'q13812833598',
  database: 'sbook',
  synchronize: false,
  logging: true,
  entities: [Novel, NovelChapter, MasterCategory],
  migrations: ['./src/migrations/*.ts'],
  timezone: '+08:00',
  charset: 'utf8mb4',
});